/* 监控仪表板页面样式 */

.monitoring-dashboard {
  padding: 24px;
  background: #f0f2f5;
  min-height: 100vh;
}

/* 页面头部 */
.dashboard-header {
  margin-bottom: 24px;
  padding: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.dashboard-header h2 {
  margin: 0 0 4px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #1890ff;
}

.dashboard-header .ant-typography {
  margin-bottom: 0;
}

/* 状态概览 */
.status-overview {
  margin-bottom: 24px;
}

.status-overview .ant-card {
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: all 0.3s ease;
}

.status-overview .ant-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.status-overview .ant-statistic {
  margin-bottom: 8px;
}

.status-overview .ant-tag {
  font-size: 12px;
}

/* 仪表板标签页 */
.dashboard-tabs {
  margin-bottom: 24px;
}

.dashboard-tabs .ant-tabs-nav {
  margin-bottom: 16px;
}

.dashboard-tabs .ant-tabs-tab {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dashboard-tabs .ant-tabs-content {
  background: transparent;
}

/* 性能分析 */
.performance-analysis {
  margin-top: 16px;
}

.performance-analysis .ant-card {
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.performance-analysis .ant-statistic {
  margin-bottom: 16px;
}

.performance-analysis .ant-progress {
  margin-bottom: 8px;
}

/* 告警管理 */
.alert-management {
  margin-top: 16px;
}

.alert-management .ant-card {
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.alert-management .ant-alert {
  margin-bottom: 8px;
}

.alert-management .ant-alert-action {
  margin-left: 8px;
}

/* 系统设置 */
.system-settings {
  margin-top: 16px;
}

.system-settings .ant-card {
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.system-settings .ant-divider {
  margin: 16px 0;
}

.system-settings .ant-space {
  width: 100%;
}

.system-settings .ant-progress {
  margin-top: 8px;
}

/* 深色主题支持 */
.monitoring-dashboard.dark {
  background: #141414;
  color: #ffffff;
}

.monitoring-dashboard.dark .dashboard-header {
  background: #1f1f1f;
  color: #ffffff;
}

.monitoring-dashboard.dark .ant-card {
  background: #1f1f1f;
  border-color: #303030;
  color: #ffffff;
}

.monitoring-dashboard.dark .ant-card-head {
  background: #1f1f1f;
  border-color: #303030;
  color: #ffffff;
}

.monitoring-dashboard.dark .ant-card-head-title {
  color: #ffffff;
}

.monitoring-dashboard.dark .ant-statistic-title {
  color: #bfbfbf;
}

.monitoring-dashboard.dark .ant-statistic-content {
  color: #ffffff;
}

.monitoring-dashboard.dark .ant-tabs-nav {
  background: #1f1f1f;
  border-color: #303030;
}

.monitoring-dashboard.dark .ant-tabs-tab {
  color: #bfbfbf;
  border-color: #303030;
}

.monitoring-dashboard.dark .ant-tabs-tab-active {
  color: #1890ff;
  border-color: #1890ff;
}

.monitoring-dashboard.dark .ant-tabs-content-holder {
  background: transparent;
}

.monitoring-dashboard.dark .ant-form-item-label > label {
  color: #ffffff;
}

.monitoring-dashboard.dark .ant-input,
.monitoring-dashboard.dark .ant-input-number,
.monitoring-dashboard.dark .ant-select-selector {
  background: #141414;
  border-color: #303030;
  color: #ffffff;
}

.monitoring-dashboard.dark .ant-progress-bg {
  background: #1890ff;
}

.monitoring-dashboard.dark .ant-divider {
  border-color: #303030;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .monitoring-dashboard {
    padding: 12px;
  }
  
  .dashboard-header {
    padding: 16px;
  }
  
  .dashboard-header h2 {
    font-size: 20px;
  }
  
  .status-overview .ant-col {
    margin-bottom: 16px;
  }
  
  .dashboard-tabs .ant-tabs-nav {
    overflow-x: auto;
  }
}

@media (max-width: 576px) {
  .monitoring-dashboard {
    padding: 8px;
  }
  
  .dashboard-header {
    padding: 12px;
  }
  
  .dashboard-header h2 {
    font-size: 18px;
  }
  
  .dashboard-header .ant-space {
    flex-wrap: wrap;
  }
  
  .dashboard-header .ant-btn {
    margin-bottom: 8px;
  }
}

/* 动画效果 */
.ant-card {
  transition: all 0.3s ease;
}

.ant-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

/* 加载动画 */
.ant-spin-nested-loading > div > .ant-spin {
  max-height: none;
  background: rgba(255, 255, 255, 0.8);
}

.dark .ant-spin-nested-loading > div > .ant-spin {
  background: rgba(31, 31, 31, 0.8);
}

/* 进度条样式 */
.ant-progress-line {
  margin-bottom: 8px;
}

.ant-progress-bg {
  transition: width 0.3s ease;
}

/* 标签样式 */
.ant-tag {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 4px;
}

/* 统计卡片样式 */
.ant-statistic {
  margin-bottom: 8px;
}

.ant-statistic-title {
  font-size: 14px;
  color: #666;
  margin-bottom: 4px;
}

.ant-statistic-content {
  font-size: 24px;
  font-weight: 600;
  color: #1890ff;
}

/* 模态框样式 */
.ant-modal {
  max-width: 90%;
}

.ant-modal-body {
  padding: 24px;
}

.ant-modal-footer {
  padding: 16px 24px;
}

/* 表单样式 */
.ant-form-item {
  margin-bottom: 16px;
}

.ant-form-item-label > label {
  font-weight: 500;
}

.ant-input-number {
  width: 100%;
}

/* 按钮样式 */
.ant-btn {
  border-radius: 4px;
  font-weight: 500;
}

.ant-btn-primary {
  background: #1890ff;
  border-color: #1890ff;
}

.ant-btn-primary:hover {
  background: #40a9ff;
  border-color: #40a9ff;
}

/* 全屏模式 */
.monitoring-dashboard:fullscreen {
  padding: 0;
  background: #000;
}

.monitoring-dashboard:fullscreen .dashboard-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  border-radius: 0;
}

.monitoring-dashboard:fullscreen .status-overview,
.monitoring-dashboard:fullscreen .dashboard-tabs {
  margin-top: 100px;
}

/* 键盘快捷键支持 */
.monitoring-dashboard {
  outline: none;
}

.monitoring-dashboard:focus {
  box-shadow: 0 0 0 2px #1890ff;
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
  .monitoring-dashboard {
    background: #ffffff;
    border: 2px solid #000000;
  }
  
  .ant-card {
    border: 2px solid #000000;
  }
  
  .ant-btn {
    border: 2px solid #000000;
  }
}

/* 减少动画模式 */
@media (prefers-reduced-motion: reduce) {
  .ant-card,
  .ant-progress-bg {
    transition: none;
  }
}

/* 打印样式 */
@media print {
  .monitoring-dashboard {
    background: white;
    padding: 0;
  }
  
  .dashboard-header {
    position: static;
    background: white;
    border: 1px solid #ddd;
  }
  
  .ant-card {
    border: 1px solid #ddd;
    box-shadow: none;
    page-break-inside: avoid;
  }
  
  .ant-btn {
    display: none;
  }
  
  .ant-tabs-nav {
    display: none;
  }
  
  .ant-tabs-content {
    display: block !important;
  }
  
  .ant-tabs-tabpane {
    display: block !important;
  }
}

/* 自定义滚动条 */
.monitoring-dashboard::-webkit-scrollbar {
  width: 8px;
}

.monitoring-dashboard::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.monitoring-dashboard::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

.monitoring-dashboard::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.dark .monitoring-dashboard::-webkit-scrollbar-track {
  background: #1f1f1f;
}

.dark .monitoring-dashboard::-webkit-scrollbar-thumb {
  background: #444;
}

.dark .monitoring-dashboard::-webkit-scrollbar-thumb:hover {
  background: #666;
}

/* 悬浮效果 */
.status-overview .ant-card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  transform: translateY(-4px);
}

/* 加载状态 */
.ant-spin-spinning {
  opacity: 0.8;
}

/* 图表容器 */
.chart-container {
  width: 100%;
  height: 300px;
  position: relative;
}

.chart-container .recharts-wrapper {
  width: 100% !important;
  height: 100% !important;
}

.chart-container .recharts-surface {
  width: 100% !important;
  height: 100% !important;
}

/* 网格布局 */
.grid-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

/* 网格项目 */
.grid-item {
  background: white;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: all 0.3s ease;
}

.grid-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

/* 工具提示 */
.ant-tooltip {
  max-width: 300px;
}

.ant-tooltip-inner {
  background: rgba(0, 0, 0, 0.8);
  color: white;
  border-radius: 4px;
  padding: 8px 12px;
}

/* 状态指示器 */
.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;
}

.status-indicator.healthy {
  background: #52c41a;
}

.status-indicator.warning {
  background: #faad14;
}

.status-indicator.critical {
  background: #f5222d;
}

/* 时间线样式 */
.ant-timeline-item-head {
  background: transparent;
}

.ant-timeline-item-tail {
  border-left: 2px solid #f0f0f0;
}

.dark .ant-timeline-item-tail {
  border-left-color: #303030;
}

/* 徽章样式 */
.ant-badge {
  font-size: 12px;
}

.ant-badge-count {
  box-shadow: 0 0 0 2px #f0f2f5;
}

.dark .ant-badge-count {
  box-shadow: 0 0 0 2px #141414;
}

/* 分割线样式 */
.ant-divider {
  border-color: #f0f0f0;
}

.dark .ant-divider {
  border-color: #303030;
}